export default async function ({ route, redirect, store }) {
  await store.dispatch('loadLoggedUser')
  const { state: { loggedUser }} = store
  if (!loggedUser && route.path !== '/login') {
    return redirect({
      path: '/login'
    })
  }
  store.commit('setBreadcrumbData', [])
}
